package com.insta.java.metier;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.insta.java.dao.UserDao;
import com.insta.java.model.User;

@Service("userManager")
public class UserManager{

	@Autowired
	UserDao userDao;
	
	public void setUserDao(UserDao userDao){
		this.userDao= userDao;
	}
	
	public void save(User user) {
		userDao.save(user);
	}

	public void update(User user) {
		userDao.update(user);
	}

	public void delete(User user) {
		userDao.delete(user);
	}
	
	public User findByLogin(String login) {
		return userDao.findByLogin(login);
	}
	
}
